{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "2db2b5f3-ea0f-422c-8f87-8d017d2f4f05",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入您的姓名: 小明\n",
      "请输入您的班级: 经济2341\n",
      "请输入您的学号: 202302001\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "您的姓名是： 小明\n",
      "您的班级是： 经济2341\n",
      "您的学号是： 202302001\n"
     ]
    }
   ],
   "source": [
    "'''2024/9/11 星期三\n",
    "'''\n",
    "name=input('请输入您的姓名:')\n",
    "班级=input('请输入您的班级:')\n",
    "学号=(input('请输入您的学号:'))\n",
    "print('您的姓名是：',name)\n",
    "print('您的班级是：',班级)\n",
    "print('您的学号是：',学号)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "37d989b9-d2c8-48a3-afa2-5ad7a8890697",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入一个整数： 9\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9.0\n"
     ]
    }
   ],
   "source": [
    "x=input(\"请输入一个整数：\")\n",
    "print(float(x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "ff4b0652-984f-4b2e-a0c5-889badc0b7d0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "请输入一个整数： 10\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.1\n"
     ]
    }
   ],
   "source": [
    "p=input(\"请输入一个整数：\")\n",
    "print(1/float(p))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "8000cf84-1ceb-46bb-9afb-f50f9fc53f87",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "a+b= 12\n",
      "a-b= 8\n",
      "a*b= 20\n",
      "a/b= 5.0\n"
     ]
    }
   ],
   "source": [
    "a=10\n",
    "b=2\n",
    "print(\"a+b=\",a+b)\n",
    "print(\"a-b=\",a-b)\n",
    "print(\"a*b=\",a*b)\n",
    "print(\"a/b=\",a/b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "a991c24b-b29e-47dc-8cc0-d10f23f8c2a9",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "西\n",
      "广西\n",
      "广西财经学院广西财经学院广西财经学院\n",
      "广西财经学院我爱你\n"
     ]
    }
   ],
   "source": [
    "a=\"广西财经学院\"\n",
    "b=\"我爱你\"\n",
    "print(a[1])\n",
    "print(a[0:2])\n",
    "print(a*3)\n",
    "print(a+b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "88cad786-d243-4fa8-b957-9f7300926332",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello,gxufeee\n",
      "13\n",
      "hello,gxfeee\n",
      "HELLO,GXFEEE\n",
      "['HELLO', 'GXUFE']\n"
     ]
    }
   ],
   "source": [
    "a=\"+hello,gxufeee+\"\n",
    "b=a.strip(\"+\")\n",
    "c=len(b)\n",
    "h=\"hello,gxfeee\"\n",
    "d=h.replace(\"gxufeee\",\"gxufe\")\n",
    "e=d.upper()\n",
    "f=\"HELLO,GXUFE\"\n",
    "g=f.split(\",\")\n",
    "\n",
    "print(b)\n",
    "print(c)\n",
    "print(d)\n",
    "print(e)\n",
    "print(g)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "c8ff7577-c034-4824-8a42-b05f9b3479eb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['Guangxi', 'University', 'of', 'Finance', 'and', 'Economics']\n"
     ]
    }
   ],
   "source": [
    "a=\"Guangxi University of Finance and Economics\"\n",
    "b=a.split(\" \")\n",
    "print(b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "0590a124-fcae-46eb-8372-8416ff442d3e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "小明总共需支付159.90元\n"
     ]
    }
   ],
   "source": [
    "a=15.99\n",
    "b=10\n",
    "c=a*b\n",
    "print(\"小明总共需支付%.2f元\"%(c))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ce0962f3-f834-496c-b734-1ab841721fc5",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
